#!/bin/bash
# ip=192.168.3.26

read -p "Please input a ip : " ip

ping -c1 $ip &>/dev/null
if [ $? -eq 0 ];then
	echo "$ip is up."
else
	echo "$ip is down."
fi
